package com.masterclient.app.modules.goods.contract;

import android.support.annotation.NonNull;

import com.eoner.baselibrary.base.BasePresenter;
import com.eoner.baselibrary.base.BaseView;
import com.eoner.baselibrary.bean.goods.CommodityDetailData;
import com.eoner.baselibrary.bean.order.ConfirmOrderData;
import com.masterclient.app.modules.cart.beans.AddShopCartBean;


public interface CommodityDetailContract {

    interface View extends BaseView {

        public void showCommodityDetail(CommodityDetailData data);

        void getCommodityDetailFailed(String msg);

        void pickUpSalesruleSuccess(String coupon_code, String msg);
        void pickUpSalesruleFailed(String msg);

        void favoriteFailed(String msg);
        void removeFavoriteSuccess();
        void addFavoriteSuccess();

        void addCartSuccess(AddShopCartBean addShopCartBean);
        void addCartFailed(String msg);

        void confirm_order_success(ConfirmOrderData data,String code);
        void setSaleRemainSuccess();

        void confirm_order_failed(String msg);
        void setSaleRemainFail(String msg);

    }


    abstract static class Presenter extends BasePresenter<View> {
        @Override
        public void onStart() {

        }

        public abstract void getCommodityDetail(@NonNull String id,String code,boolean is_form_dealer);
        public abstract void pickUpSalesrule(String coupon_code,String parent_product_id);
        public abstract void removeFavorite(String product_id);
        public abstract void addFavorite(String product_id);
        public abstract void addCart(String product_id,String num);
        public abstract void confirm_order(String buy_product, String buy_type, String sale_type);
        public abstract void setSaleRemain(String event_map_id, String product_id, String type);
    }
}